
export const storage = {
  set (key:string, value:string) {
    sessionStorage.setItem(key, value)
  },
  get (key: string): string {
    const k = sessionStorage.getItem(key)
    if (k == null) {
      return ''
    }
    return k
  },
  remove (key: string) {
    sessionStorage.removeItem(key)
  },
  removeAll () {
    sessionStorage.clear()
  }
}

export const longStorage = {
  set (key:string, value:string) {
    localStorage.setItem(key, value)
  },
  get (key: string): string {
    const k = localStorage.getItem(key)
    if (k == null) {
      return ''
    }
    return k
  },
  remove (key: string) {
    localStorage.removeItem(key)
  },
  removeAll () {
    localStorage.clear()
  }
}
